﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Drawing;
using System.IO;

namespace Decembre.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Message";
            /*System.IO.File.Copy(Server.MapPath("~/TEMP_PHOTOS/loeva.jpg"), Server.MapPath("~/TEMP_PHOTOS/loeva_copie.jpg"),true);
            Bitmap i = new Bitmap(Server.MapPath("~/TEMP_PHOTOS/loeva.jpg"));
            int w = i.Width; int h = i.Height;//taille image d'origine
            int nouvelle_w = 100;
            double red =Math.Floor((double)(nouvelle_w * 100 )/ w);
            double nouvelle_h = Math.Floor((double)(h * red) / 100);
            Bitmap img = new Bitmap(i, new Size(Convert.ToInt32(nouvelle_w), Convert.ToInt32(nouvelle_h)));
            i.Dispose();
            img.Save(Server.MapPath("~/TEMP_PHOTOS/loeva_copie.jpg"));
            img.Dispose();*/
            return View();
        }

        public ActionResult About()
        {            
            ViewBag.Message = "Your app description page.";
            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
